home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 25 / AACD 25.iso / AACD / Graphics / PerfectPaint / rexx / Anim / Dissolve / Point < prev    next >
Encoding:
Text File  |  2001-04-17  |  1.4 KB  |  103 lines

  1. /* Dissolve Linear
  2. 100
  3. */
  4.  
  5.     call addlib("rexxmathlib.library", 5, -30, 0)
  6.  
  7.     options results
  8.  
  9.     parse ARG Port Opt1 Opt2 Opt3 s0 t0 s1 t1 b
  10.     
  11.     ADDRESS value Port
  12.  
  13.     pp_GetWidth
  14.     w=result
  15.     pp_GetHeight
  16.     h=result
  17.     pp_GetDepth
  18.     D=result
  19.  
  20.     pp_GetCurrentBuffer
  21.     CBf=result
  22.     pp_GetCurrentBrush
  23.     CB=result
  24.  
  25.     pp_FindEmptyBrush
  26.     Brush=result
  27.     if Brush=-1 then DO
  28.         pp_Warn "can't*find*empty|Brush."
  29.         EXIT        
  30.     END
  31.     pp_SetBrush Brush        
  32.  
  33.     pp_FindEmptyBuffer
  34.     Bf=result
  35.     if Bf=-1 then DO
  36.         pp_Warn "can't*find*empty|Buffer."
  37.         EXIT        
  38.     END
  39.     pp_SetBuffer Bf
  40.  
  41.     pp_New w h 24
  42.     pp_SpareOnOff
  43.  
  44.     /* Draw your Mask */
  45.         pp_ClearRange 0
  46.         pp_setRange 0 0 0 0 0
  47.         pp_setRange 0 19 255 255 255
  48.         pp_Spray 3 100        
  49.  
  50.         pp_EffectOn
  51.         pp_ComposeReqOff
  52.         pp_BoxF 0 0 w-1 h-1
  53.         pp_ComposeReqOn
  54.         pp_EffectOff
  55.  
  56.     /*    End    */
  57.     
  58.     pp_SparetoStencil
  59.     pp_SSave "ram:DisSten"
  60.     pp_ClearCurrentBuffer
  61.     pp_SetBuffer CBf
  62.  
  63.     pp_SLoad "ram:DisSten"
  64.     ADDRESS COMMAND
  65.     'delete >nil: ram:DisSten'
  66.     ADDRESS value Port
  67.  
  68.     pp_GotoFrame s1
  69.     pp_PicttoSpare
  70.     pp_GotoFrame s0            
  71.     pp_Pickbrush 0 0 W H
  72.     
  73.     step=(s1-s0)
  74.     Step_f=255/Step
  75.  
  76.     DO i=s0+1 to s1
  77.         IF t1=1 then DO
  78.             pp_GotoFrame (s1+i-s0)
  79.             pp_PicttoSpare
  80.         END
  81.  
  82.         pp_GotoFrame i
  83.  
  84.         IF t0=0 then DO
  85.             pp_plot W/2 H/2
  86.         END
  87.  
  88.         f=Step_f*(i-s0)
  89.         IF Opt1=0 then DO
  90.             pp_Dissolve f 255            
  91.         END
  92.         ELSE DO
  93.             pp_Dissolve f f
  94.         END
  95.         pp_Refresh
  96.     END
  97.  
  98.         pp_Gotoframe s0
  99.         pp_FreeBrush
  100.         pp_SetBrush CB
  101.  
  102.     EXIT
  103.